Tracking surgical items with prediction of duplicate imaging of items

ABSTRACT

A computer-implemented method for tracking surgical textiles includes receiving a first image comprising a first textile-depicting image region, receiving a second image comprising a second textile-depicting image region, measuring a likelihood that the first and second image regions depict at least a portion of the same textile, and incrementing an index counter if the measure of likelihood does not meet a predetermined threshold. The measure of likelihood may be based on at least one classification feature at least partially based on aspects or other features of the first and second images.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Patent Application Ser. No. 62/441,494 filed on Jan. 2, 2017, which is hereby incorporated by this reference in its entirety.

TECHNICAL FIELD

This invention relates generally to the field of surgical item tracking, and more specifically to new and useful systems and methods for tracking surgical items with prediction of duplicate imaging of items.

BACKGROUND

Surgical textiles (e.g., sponges, towels, etc.) are typically used during a surgical procedure to absorb loss of patient fluids, such as blood. For example, one or more surgical textiles may be placed inside the patient at a surgical site to absorb blood, and subsequently removed (e.g., upon saturation or after the procedure is complete). However, there is a risk that at least some of the surgical textiles may be inadvertently retained inside the patient. Retained foreign objects such as textiles may harm patient health such as by causing infection or even death, and may require additional surgeries or hospital readmission in order to remove the retained object.

One traditional approach to avoid inadvertent retention of surgical textiles is based on a manual count before and after the surgical procedure. For example, medical staff may perform manual counts of number of surgical textiles before their use (e.g., upon opening a new sterile package of surgical textiles) and after their use (e.g., upon removal from the patient's surgical site). A discrepancy between the manual counts may prompt medical stall to locate any apparently missing textiles, perform a recount, perform an X-ray scan of the patient, or perform other risk mitigation. However, human error in such manual counting introduces uncertainty in whether the counts are correct, thereby potentially causing medical staff to incorrectly conclude that there is a retained surgical textile, or worse, incorrectly conclude that all surgical textiles are accounted for and that all textiles are removed from the patient.

Another conventional approach to identify retained surgical textiles in a patient is to use specialized surgical textiles having tags (e.g., RFID, bar codes, etc.) that are scannable during the “before” and “after” counts to help improve accuracy in the counts. Furthermore, such tagged surgical textiles may be part of a tracking system in which specialized scanners may be used to scan the patient and identify when the lagged surgical textiles are retained in the patient. However, as both of these approaches require exclusive use of tagged surgical textiles in order to be effective, these approaches prevent medical staff from using surgical textiles of their choosing. Additionally, the specialized surgical textiles are more expensive than regular surgical textiles and require pairing with scanners and/or other equipment for textile tracking, thereby significantly increasing costs for hospitals and other medical institutions. Thus, it is desirable to have new and improved systems and methods for tracking surgical items.

SUMMARY

Generally, in some variations, a computer-implemented method for tracking surgical textiles includes receiving a first image including a first textile-depicting image region, receiving a second textile-depicting image region, measuring a likelihood that the first and second image regions depict at least a portion of the same textile where the measure of likelihood is at least partially based on a first aspect of the image region and a second aspect of the second image region, and incrementing an index counter of the measure of likelihood does not meet a predetermined threshold. The index counter may be displayed on a display for a user, or otherwise communicated to a user to indicate a textile count.

In another variation, a computer-implemented method for tracking surgical textiles includes receiving a first image including a first textile-depicting image region, receiving a second image including a second textile-depicting image region, defining at least one classification feature at least partially based on a first aspect of the first image region and or a second aspect of the second image region, and measuring a likelihood that the first and second image regions depict at least a portion of the same textile, where the measure of likelihood is based at least in pan on the classification feature, such as by using a machine learning classification algorithm.

In some variations, the one or mote classification features may be based on keypoints, or points of interest, that characterize the textile-depicting image regions in the images. For example, the keypoints may be generated based on a feature extraction technique, which may additionally generate a respective feature descriptor (e.g., a vector) for each keypoint that includes features describing the keypoint. The keypoints for two images under analysis may be correlated or matched based on their feature descriptors, such as with a K-nearest neighbor algorithm or other suitable algorithm. Additionally, one or more various classification features may be generated based on the keypoints. For example, a classification feature may be at least partially based on a numerical difference between the feature descriptors for the matched first and second keypoints. As another example, a classification feature may be at least partially based on a number of predicted matches of first and second keypoints between the two images. As yet another example, a classification feature may be at least partially based on a goodness of fit for a homography transform relating the matched first and second keypoints. Another example of a classification feature is based on a consensus voting for an overall angle of rotation between the matched first and keypoints that is predicted with a voting technique.

Additionally or alternatively, the one or more classification features may be based on aspects characterizing a fluid pattern in the depicted surgical textiles. For example, a classification feature may be at least partially based on area of fluid depicted in the first image region and/or area of fluid depicted in the second image region. In another example, a classification feature may be at least partially based on quantified measures of a fluid component (e.g., hemoglobin mass) depicted in the first image region and/or second image region.

In some variations, the measure of likelihood may be generated based on a classification algorithm applied to the one or more classification features. Two or more images may be classified as potentially depicting at least a portion of the same textile if the measure of likelihood meets the predetermined threshold. The measure of likelihood that the first and second image regions depict at least a portion of the same textile, and/or a classification of the first and second images as potentially depicting duplicate textiles, may be communicated to a user. Furthermore, the method may include prompting the user to confirm whether the first and second image regions depict at least a portion of the same textile. Based on the user's confirmation, the index counter may be decremented and or at least one of the deemed duplicate images may be deleted from a memory, storage device, and/or display.

In another variation, a computer-implemented method for tracking surgical textiles includes receiving a first image comprising a first textile-depicting image region, receiving a second image comprising a second textile-depicting image region, warping at least one of the first and second image regions such that the first and second image regions have corresponding textile-depicting pixels (or pixel groups); and measuring a likelihood that use first and second image regions depict at least a portion of the same textile. The measure of likelihood may be based at least in part on similarity between the corresponding textile-depicting pixels or pixel groups. Furthermore, warping at least one of the first image region and the second image region may include determining a set of one or more textile comers in the first image region or the second image region and mapping the set of textile corners onto a known shape.

Generally, in some variations, a system for tracking surgical textile may include a processor configured to receive a first image comprising a first textile-depicting image region, receive a second image comprising a second textile-depicting image region, define at least one classification feature at least partially based on a first aspect of the first image region and/or a second aspect of the second image region, and measure a likelihood that the first and second image regions depict at least a portion of the same textile, wherein the measure of likelihood is based at least in part on the classification feature. The processor may, in some variations, be further configured to perform the above-described method. Furthermore, the system may include an optical sensor configured to capture images and/or a display configured to display the index counter and/or images.

In another variation, a system for tracking surgical textiles may include a processor configured to: receive a first image comprising a first textile-depicting image region, receive a second image comprising a second textile-depicting image region, and measure a likelihood that the first and second image regions depict at least a portion of the same textile. In this variation, the measure of likelihood is at least partially based on a first aspect of the first image region and a second aspect of the second image region. The processor may be further configured to increment an index counter if the measure of likelihood does not satisfy a predetermined threshold. Furthermore, the system may include an optical sensor configured to capture images and/or a display configured to display the index counter and/or images.

In another variation, a system for tracking surgical textiles may include a processor configured to receive a first image comprising a first textile-depicting image region, receive a second image comprising a second textile-depicting image region, warp at least one of the first and second image regions such that the first and second image regions have corresponding textile-depicting pixels (or pixel groups), and measure a likelihood that the first and second image regions depict at least a portion of the same textile, in this variation, the measure of likelihood is based at least in part on similarity between the corresponding textile-depicting pixels or pixel groups. Furthermore, the processor may be configured to warp at least one of the first image region and the second image region by determining a set of one or more textile corners in the first image region or the second image region and mapping the set of textile corners onto a known shape.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustrative schematic of one variation of a system for tracking surgical items.

FIG. 2 is a flowchart schematic of one variation of a method for tracking surgical items.

FIG. 3 is a flowchart schematic of an exemplary variation of a method for tracking surgical items including defining at least one classification feature based on extracted features and keypoints in mage regions.

FIG. 4 is an illustrative schematic of two images with matching and non-matching keypoints.

FIG. 5 is a table of exemplary classification features in one variation of a method for tracking surgical items.

FIG. 6A is a flowchart schematic of an exemplary variation of a method for tracking surgical items including defining at least one classification feature based on area of fluid patterns in the depicted surgical items. FIG. 6B is a graphical representation of parameters used to define the classification feature shown in FIG. 6A.

FIG. 7 is a flowchart schematic of an exemplary variation of a method for tracking surgical items including defining at least one classification feature based on quantifications of fluid components in the depicted surgical items.

FIG. 8 is an exemplary display of images depicting surgical textiles.

FIG. 9A is an exemplary display for communicating to a user regarding an image pair that potentially depicts the same surgical textile. FIG. 9B is an exemplary display for displaying images of surgical textiles and communicating to a user regarding multiple image pairs, where each image pair potentially depicts the same surgical textile. FIG. 9C is an exemplary display for displaying images of surgical textiles with a textile count and aggregate risk score of duplicate images.

FIG. 10 is a table summarizing results of exemplary implementations of a method for tracking surgical items as described herein.

FIG. 11 is a flowchart schematic of another variation of a method for tracking surgical items.

DETAILED DESCRIPTION

Examples of various aspects and variations of the invention are described herein and illustrated in the accompanying drawings. The following description is not intended to limit the invention to these embodiments, but rather to enable a person skilled in the art to make and use the invention.

Overview

Generally, the methods and systems described herein may be used to track (e.g., count) surgical items. For example, the methods and systems may be used to count surgical textiles that have been used at a surgical site, by analyzing optical images depicting the textiles and accounting for potential repeated or duplicate imaging of textiles. Furthermore, the methods and systems may be used in conjunction with other methods and systems used to assess fluids that are lost by a patient during a surgical procedure, based on optical images depicting surgical textiles containing fluids collected by the patient.

The methods and systems may be used in a variety of settings, including in a hospital or clinic setting (e.g., operating or clinical setting), a military selling (e.g., battlefield), or other suitable medical treatment settings. Tracking the surgical items may, for example, enable a more accurate count of the surgical items, which may help avoid inadvertent retention of surgical items in the patient following the surgical procedure. Although. Use methods and systems described herein are primarily described with reference to tracking surgical textiles such as surgical sponges, it should be understood that in other variations, they may additionally or alternatively be used to track other items (e.g., surgical instruments).

The methods described herein may be computer-implemented and performed at least in part by one or more processors. For example, as shown in FIG. 1, in one variation, the method may be performed at least in part by a computer device such as a mobile device 150 (e.g., tablet, smartphone, etc.) that is configured to capture images of one or more surgical textiles in an operating room or other medical site. However, some or all of the method may be performed by one or more processors that are separate from the mobile device 150 (e.g., on-site in the operating room or remotely outside the operating room). Other aspects of variations of methods and systems for tracking surgical items are described in further detail below.

During a medical procedure, extracorporeal fluids (e.g., blood) that are lost by the patient may be collected with surgical textiles, such as surgical sponges, surgical dressings, surgical towels, and/or other textiles. An image (e.g., single image or an image frame from a video feed) may be taken of at least a portion of a surgical textile placed in the Held of view of a camera, and this process may be repeated for multiple surgical textiles. The image may be analyzed to quantify an aspect of the fluid in the depicted surgical textile, such as an amount (e.g., mass, weight, volume) of fluid and/or amount or concentration of a fluid component in the fluid. For example, the image may be an optical color image, and pixel color values may be correlated to an estimated or predicted blood component concentration (e.g., with template matching techniques and/or parametric modeling techniques described in further detail below, etc.). Accordingly, analysis of multiple images of soiled surgical textiles may be aggregated into a running total or overall quantification of estimated amount of fluid loss and or fluid component loss (e.g., blood or hemoglobin) by the patient during the procedure.

Furthermore, since each used or soiled surgical textile may be imaged to facilitate analysis of its fluid or fluid component content, the number of images may generally correlate with the number of used surgical textiles and thus be used as a basis for determining a count of surgical textiles (e.g., for tracking surgical textiles before and after a medical procedure) However, there is a possibility that a surgical textile may be inadvertently imaged multiple times (e.g., if a user forgets that a surgical textile has already been imaged), which may lead to an inaccurate surgical textile count and/or an inaccurate running total or overall quantification of fluid loss and or fluid component loss by the patient (e.g., due to “double-counting” one or more textiles). To counteract these consequences of inadvertent duplicate imaging, one or more of the images may be analyzed to determine a measure of likelihood that the image depicts the same surgical textile as another image. For example, although generally each new image obtained may correspond to an increase in the count of surgical textiles (e.g., that have been extracted from the patient or sterile area for the surgical procedure for an “after” count), the count may be adjusted based at least in part on the measure of likelihood that a surgical textile has been imaged more than once. A detection of a potential duplicate image of a surgical textile may, for example, trigger a prompt to the user to confirm whether the surgical textile has been imaged more than once. As another example, detection of a potential duplicate image of a surgical textile may automatically withhold from incrementing a count and/or automatically withhold (from a running total) an estimated quantity of fluid or fluid component in that surgical textile.

Furthermore, while in some variations the methods described herein may be used to track surgical textiles within the same surgical procedure (or surgical session), in other variations the methods described herein may additionally or alternatively be used to track surgical textiles among different procedures or sessions. Surgical textiles may inadvertently travel between different surgical sessions (e.g., on a nurse or other person moving between different rooms). This may lead to inaccurate textile counts in its origin session and or destination session, such as due to inadvertent duplicate imaging of the traveling textile in its origin and/or destination sessions. Accordingly, in some variations the methods described herein may compare textile-depicting images obtained from different surgical sessions and stored (e.g., on a server or other suitable data storage device) to track surgical textiles within one or more medical environments such as a hospital. For example, a first image associated with a first surgical procedure may be compared with one or more images associated with other surgical procedures performed within a suitable window of lime (e.g., within a preceding or surrounding period of lime of 4 hours, 8 hours, 12 hours, 24 hours, etc.), in order to predict whether a textile has been imaged more than once within the window of time. Such cross-procedural image comparisons using methods described herein may be used to identify images that were taken during different surgical procedures and likely depict at least a portion of the same traveling surgical textile.

Furthermore, traveling textiles may lead to inaccurate textile counts in both its origin and destination sessions, such as due to incorrect determination of a retained textile in the patient due to the textile's inadvertent absence in the origin session's textile count, incorrect accounting for all textiles removed from the patient due to the textile's inadvertent presence in the destination session's textile count, etc. Surgical textiles may, in some variations, be tagged with a unique identifier such as with infrared (IR) and/or ultraviolet (UV)-detectable fluid creating a unique fluid pattern on each textile. The unique fluid patterns may also be associated with a particular surgical procedure. Accordingly, in some variations, the methods described herein may compare (e.g., with pattern recognition techniques) textile-depicting IR and or UV images obtained from different surgical sessions and stored, to track surgical textiles across different surgical sessions within one or more medical environments. Such cross-procedural image comparisons using methods described herein may be used to identify images that were taken during different surgical procedures and likely depict at least a portion of the same traveling surgical textile.

Although variations of the methods are primarily described herein as relating to tracking surgical textiles, it should be understood that in other variations, the method may additionally or alternatively be used to track other items using optical images in a similar manner. For example, the method may lie used to track surgical instruments and/or other surgical items in order to further reduce the risk of foreign objects retained in the pattern.

Methods for Tracking Surgical Textiles

As shown in FIG. 2, in some variations, a method 200 for tracking surgical textiles or other items may include receiving a first image comprising a first textile-depicting image region 220, receiving a second image comprising a second textile-depicting image region 230, measuring a likelihood that the first and second image regions depict at least a portion of the same textile 250; and incrementing an index counter 272 if the measure of likelihood does not meet a predetermined threshold (270). The measure of likelihood may, in some variations, be at least partially based on a first aspect of the first image region and a second aspect of the second image region. For example, the aspects of the textile-depicting image regions may uniquely characterize the fluid pattern in the depicted surgical textile to some manner, similar to a bar code or other unique identifier. As shown in FIG. 2, the method may include comparing the measure of likelihood of duplicate imaging to a predetermined threshold (270), where the threshold is a cutoff for classifying an image pair as “not duplicate” or “potentially duplicate” When it is more likely that the surgical textile has not been previously imaged, the image pair may be classified as “not duplicate” and a surgical textile count may be incremented. In contrast, when it is more likely that the surgical textile has been previously imaged, the image pair may be classified as “potentially duplicate” and the surgical textile count may remain unchanged, at least until a user has confirmed whether duplicate imaging has occurred.

While the method is primarily described herein with reference to a comparison of two images with respective textile-depicting image regions, it should be understood that in practice, more than two images may be compared in a similar manner. For example, after receiving each image, one or more aspects of the image may be stored and associated with that image (e.g., with a hash function or other suitable data mapping, which may enable faster data lookup). To predict whether any two images depict the same textile, one or more classification features for every possible pair of images may be generated (e.g., a newly received image may be compared to every previously-received image, or all possible pairs may be compared after all images are received) and analyzed as described below.

Images

In some variations, as shown in FIG. 2, the method 200 may include generating or obtaining at least one image of a surgical textile 210. Generating images of surgical textiles functions to provide evidential support for a count of surgical textiles. Upon generation, the images may be stored in a database in a suitable date storage medium (e.g., local or remote). Receiving a first image 220 and receiving a second image 230 may include receiving the image from memory or other suitable storage. In some variations, however, not every step depicted in FIG. 2 need be performed in the depicted order. For example, the images may have been previously acquired and stored in a storage medium (thereby omitting generating the images directly). Each image may include the entire surgical textile or only a portion of the surgical textile. The surgical textile may be, for example, a surgical sponge, dressing, towel, or other suitable textile.

Each image (e.g., a single still image or an image frame from a video feed) may include an image region depicting at feast a portion of the surgical textile placed in the held of view of a camera. The camera may be in a handheld device or mobile device (e.g., tablet), a camera mounted on a tripod at approximately torso height or at a suitable height in another suitable manner, an overhead camera, etc. For example, a camera in a handheld device may be mounted such that the camera faces a person that holds the surgical textile in front of his or her body, or holds the surgical textile against a wall.

In some variations, the surgical textiles may be positioned and oriented in at least a partially consistent manner for imaging, which may improve accuracy in detecting whether duplicate imaging of textiles has occurred. For example, the surgical textiles may be imaged while held generally perpendicular to the optical axis of a camera, which may help reduce out-of-plane orientation differences among images. As another example, surgical textiles may be imaged while positioning textile reference markers (e.g., a blue ribbon on one edge of the textile, tag or other marker on one corner of the textile, etc.) in a consistent orientation relative to the camera's field of view, which may help reduce rotational orientation differences among images. As another example, the corners of the textiles may be located in each image and used to warp images such that the textiles are depicted as having approximately the same shape (e.g., square. rectangular, etc.), such as with warping methods described in further detail below, such that the images can be compared in various ways described herein.

The images may be optical images capturing color characteristics, with component values in a color space (e.g., RGB, CMYK, etc.) for each pixel. The image may be stored in memory or a suitable data storage module (e.g., local or remote) and processed. Processing the image may include normalizing the color characteristics of the image based on a set of one or more optical fiducials (e.g., a color fiducial). The color fiducial may represent, for example, one or more red hoes (e.g., a grid including boxes of different red hues). Normalization of the image may utilize the color fiducial to compensate for variations in lighting conditions throughout an operation, to artificially match lighting conditions in the image to a template image, to artificially match lighting conditions in the image to a light condition-dependent fluid component concentration model, etc. For example, normalizing the image may include identifying a color fiducial captured in the image, determining an assigned color value associated with the identified color fiducial, and adjusting the image such that the color value of the color fiducial in the image substantially matches the assigned color value associated with the color fiducial. The assigned color value can, for example, be determined by looking up the color fiducial in a database (e.g., identified by code, position within a set of color fiducials, position relative to a known feature of the conduit, etc.). Adjustments to the image can include, for example, adjustment of exposure, contrast, saturation, temperature, tint, etc.

In some variations, the method may include identifying a textile-depicting image region in one or more of the images. For example, identifying a textile-depicting image region may include applying an edge detection technique, applying template matching techniques, and/or applying any suitable machine vision techniques to identify boundaries of the textile-depicting image region. In another variation, identifying a textile-depicting image region may include defining the textile-depicting image region's boundaries at least partially based on user input. For example, (he user input may designate a portion of a displayed image as the textile-depicting image region (e.g., the user may define boundaries of the image region on a touchscreen display such as by touching the screen and dragging a window or frame to a size and location of a desired textile-depicting image region, or touching the screen to place markers outlining the boundaries of a desired textile-depicting image region).

Furthermore, as shown in FIG. 2, (he method may include displaying at least one of the first image and the second image 232 (or alternatively, an isolated textile-depicting image region of the images). The images may be displayed, for example, on a display on a mobile device (e.g., tablet) or any other suitable display. As shown in FIG. 8, the various images generated may be displayed in a suitable array (e.g., chronological order) for a user to view.

Aspects of Image Regions and Classification Features

As shown in FIG. 2, the method may include defining at least one of a first aspect of the first textile-depicting image region and a second aspect of the textile-depicting second image region 240. The first and second aspects are characterizations of at least a portion of the first and second images, respectively, and serve as a basis for generating a measure of likelihood that the first and second images depict the same surgical textile. In other words, the appearance (e.g., fluid pattern) of the surgical textile may serve as a unique identifier for the surgical textile, such that similar-looking surgical textiles depicted in different images may indicate duplicate imaging of the same textile.

Furthermore, the method may include defining at least one classification feature 150 at least partially based on the first aspect of the first image region and/or the second aspect of the second image region. Examples of classification features are provided in FIG. 5. The kind of classification feature may depend at least in pan on the kind of aspects of the textile-depicting image regions that have been defined, as described in further detail below.

Keypoints

An image of a surgical textile or object has keypoints, or points of interest, which can be extracted and used to collectively describe or characterize the imaged object. Furthermore, each keypoint may have a corresponding feature descriptor (e.g., a vector including a set of values), that describes the keypoint. Generally, in some variations of the method, a prediction of whether two or more images depict the same textile may be at least partially based on a comparison between keypoints identified in the images.

Accordingly, in some variations, as shown in FIG. 3, the method may include identifying a plurality of first keypoints characterizing the first image region 340 in the first image, identifying a plurality of second keypoints characterizing the second image region 342 in the second image, generating a feature descriptor for each of the first keypoints 344, and generating a feature descriptor for each of the second keypoints 346. One or more classification features for predicting duplicate imaging may then be based on at least some of the first and/or second keypoints (350).

The method may include applying a feature extraction technique such as a scale-invariant feature transform (SIFT), a speeded up robust features (SURF) technique, or any other suitable feature extraction technique in order to identify keypoints and or generate feature descriptors for the keypoints. Other examples of feature extraction techniques include but are not limited to: histogram of oriented gradients (HOG), features from accelerated segment test (FAST), local energy-based shape histogram (LESH), gradient location-orientation histogram (GLOH), fast retina keypoint (FREAK), Oriented FAST and Rotated BRIEF (ORB), Texton Maps, and learned keypoint-detectors and descriptor-generators based on trained (or unnamed) neural networks, using supervised, unsupervised, or semi-supervised learning. Furthermore. SIFT descriptors and/or keypoints, or any of the above descriptors and or keypoints, may be extracted from the depth map, possibly after a defending step that fits a linear or non-linear surface to the depth map of the sponge and subtracts it from the depth map so that the only remaining depth variation is substantially due to local 3D textures in the sponge. These 3D-texture descriptors may be extracted in addition to or in combination with any color-based descriptors. Additionally, video-based descriptors may be extracted by applying any of the above descriptor methods to the optical flow vector field computed over any number of frames. Alternatively, or in addition to optical-flow-based methods, the keypoints may be tracked across multiple frames and their descriptors in the frames may be concatenated, or the change in a descriptor across frames may be recorded. Any other video-based features, keypoints, or descriptors may additionally or alternatively be used. In some variations (e.g., at least in instances in which textiles are fully or nearly fully saturated with fluid), small spatial changes in color (which may not visible to the human eye but may be captured in the optical image) may be magnified by image processing before applying the feature extraction technique.

For example, in one variation, feature descriptors for characterizing keypoints or points of interest in an image region may be generated with a SIFT-based process. SIFT feature descriptors for characterizing points of interest in an image may be invariant to scale and rotation, and may be partially invariant to illumination changes as well. The SIFT-based process may, for example, identify a set of keypoints or points of interest in the first image region, then assign a set (or vector) of feature descriptors for the identified keypoints. Generally, the method may perform scale-space extreme detection, such as by convolving the first image with Gaussian filters at different successive scaling parameters, taking the difference of the successive Gaussian-blurred (Difference of Gaussian) images that are derived from the first image, and identifying local extrema (minima and/or maxima) of the Difference of Gaussian images across scale and space to identify candidate keypoints. The method may then perform keypoint localization (interpolating data near each candidate keypoint to accurately determine its position in the image) and refine the list of candidate keypoints (e.g., by discarding keypoints such as those having low contrast or those present on an image edge). The method may assign an orientation to each of the remaining keypoints based on directions of local image gradients. The identified keypoints may, as a result of these steps, may be substantially invariant to location in the image, as well as scale and rotation of the image. Finally, a feature descriptor may be generated for each identified keypoint such that the feature descriptors provide for invariance to other variations such as illumination, 3D rotation of the image, etc. for example, for each keypoint, the method may begin generating a feature descriptor by taking a 16 pixel×16 pixel neighborhood around the keypoint, dividing the neighborhood into 16 sub-blocks of 4 pixel×4 pixel size, and creating an 8-bin orientation histogram for each sub-block, thereby creating a total of 128 bin values. The feature descriptor for the keypoint may include the 128 bin values. Alternatively, other sizes of neighborhood and or sub-blocks may be used to generate the feature descriptor. The above-described SIFT-based process may be performed to identify keypoints and/or generate feature descriptors in all images obtained or received. Furthermore, in some variations, in addition to generating and retaining the feature descriptors, the orientations and/or scales of the keypoints (and/or other pertinent information) may be retained, which may, for example, enable determination of additional image-matching features. Additionally or alternatively, other suitable feature extraction techniques may be used to identify keypoints and/or generate feature descriptors and or other suitable information.

As shown in FIG. 3, following generation of a feature descriptor for each of the first keypoints (344) and generation of a feature descriptor for each of the second keypoints (346), the method may include predicting one or more matches between at least one of the first keypoints and at least one of the second keypoints 350. Generally, this prediction functions to identify pairwise correspondence between points of interest in the first and second textile-depicting image regions, based on similarity of their keypoints' feature descriptors. For example, the feature descriptors for the first keypoints and the feature descriptors for the second keypoints may be compared in an attempt to find the closest overall numerically-similar features across all the keypoints between the two textile-depicting image regions (e.g., with a K-nearest neighbor technique). As depicted schematically in FIG. 4, some or all of the first keypoints in the first image region 412 in the first image 410 may be matched to corresponding second keypoints of the second image region 422 in the second image 420. For example, keypoints 414 a. 414 b, and 414 c in the first surgical-depicting image region 412 may be matched to keypoints 424 a, 424 b, and 424 c in the second surgical-depicting image region 422, respectively.

Furthermore, the method may include defining at least one classification feature at least partially based on the first and second keypoints 350. Examples of classification features based on the first and second keypoints are shown in FIG. 5. In one variation, the method may include defining a classification feature (labeled as distanceFearures in FIG. 5) at least partially based on a difference between the feature descriptors for matched first and second keypoints 361. In other words, the classification feature may characterize the distance between the feature descriptors in the descriptor space for the pluralities of first and second keypoints. For example, an overall distance or difference between the feature descriptor values for a first keypoint and the feature descriptor values for a second keypoint (where the first and second keypoints have been matched) may be determined based on root mean square deviation (RMSD) or root mean square error (RMSE), or other suitable measure of distance. RMSD or RMSE may be determined for every matched pair of first and second keypoints for the first and second images, (hen aggregated (e.g., averaged) to provide a measure of overall difference between the plurality of first keypoints and the plurality of second keypoints. Generally, the smaller the difference between feature descriptors, the more likely the first and second image regions depict the same surgical textile. Furthermore, in some variations, robust aggregation methods (e.g., leaving out the 10% largest and smallest distances, or computing the median rather than average distance, etc.) may be used to make this classification feature less prone to spurious matches.

In another variation, the method may include defining a classification feature (labeled as goodnessHomography in FIG. 5) at least partially based on a goodness of fit of a tomography transform relating the matched first and second keypoints 362. Generally, a tomography transform may be configured to model how each of the plurality of first keypoints in the first image region may be mapped to its matching second keypoint in the second image region, or vice-versa. For example, as shown in FIG. 4, first keypoints (e.g., 414 a, 414 b, and 414 c ) in the first image region 412 may correspond to matching second keypoints (e.g., 424 a, 424 b, and 424 c, respectively) in the second image region 422, where the second image region 422 may be distorted relative to the first image region 412 (e.g., rotated or angled away from the camera differently). Given the location coordinates (x_(j), y_(j)) of the first keypoints in the first image region 412 and the location coordinates (x_(j), y_(j)) of the second keypoints in the second image region 422. a homography transform (e.g., a matrix) may mathematically describe the translation, rotation, scale, oul-of-plane orientation changes, and other causes of distortion between the sets of (x_(j), y_(j)) and (x_(j), y_(j)). However, the homography transform may be an imperfect fit across all of the matched pairs of first and second keypoints. Accordingly, in some variations, the method may include fitting a homography transform relating the matched first and second keypoints, and defining a classification feature at least partially based on the goodness of fit of the homography transform over all matched pairs of first and second keypoints. Any suitable goodness of fit tests may be used to generate a measure of the goodness of fit of the homography transform, such as R², robust-R², Spearman's rho, or based on percentage of keypoints within some predefined distance (e.g., in (x, y) space or other coordinate system) of their match, or any other suitable test. Furthermore, in another variation, distance in feature descriptor space may be combined with distance in (x, y) space (or other coordinate system) to create an informative goodness-of-fit measure (e.g., computing R² but weighting each keypoint's contribution by exp(−descriptor_distance) (or other suitable weighting factor) so that keypoints with less similar descriptors have less contribution to the goodness of fit. In yet another variation, if a robust fitting method such as RANSAC or Hough transform is used to fit the homography, then one of the outputs of the fitting will be a set of inlier points, and the size of this set relative to the size of the inputs may be used as a goodness-of-fit metric. Generally, the better the goodness of fit of the homography transform, the more likely the first and second image regions depict the same surgical textile.

In some variations, the method may include incorporating one or more mathematical models or functions to compensate for potential textile shape variations between images. For example, the same surgical textile may not only undergo translation, rotation, scale, and/or out-of-plane orientation changes, etc., but additionally or alternatively may undergo internal displacements (e.g., stretching or sagging, depending on how taut the textile is held during imaging). To compensate for potential shape variations, the method may, in some variations, include modifying and/or supplementing the homography transform to account for stretch, slack, etc. For example, the homography transform may be modified to incorporate a function configured to model curvature of a textile, such as curvature based on displacement of an edge of the textile (e.g., vertical displacement of an upper drooping edge of the textile), distance between reference markers placed on the textile, etc. As another example, the homography transform may be supplemented with a function configured to model curvature of a textile, where the function is applied separately (e.g., after) the homography transform to relate or map the matched pairs of first and second keypoints to each other.

In another variation, the method may include defining a classification feature (labeled as angleHough in FIG. 5) at least partially based on a measure of confidence for a predicted overall angle of textile rotation 363 between the first and second images, where me predicted angle of rotation may be derived from the matched first and second keypoints. The predicted overall angle of rotation may be based on, for example, a Hough transform or other curve-fitting or line-fitting technique. The Hough transform is a voting technique that, when applied to the matched first and second keypoints, may probabilistically predict an angle of rotation of the depicted textile based on the matched keypoints. In some variations, the consensus voting ratio (generally indicating the proportion of keypoints that “vote” for the most likely angle of rotation) may be used as a measure of confidence that the predicted overall angle of rotation is correct. Generally, the higher the consensus voting ratio, the more likely the first and second image regions depict the same surgical textile.

In another variation, the method may include defining a classification feature (labeled as measureMatches in FIG. 5) at least partially based on a measure of predicted matches of first and second keypoints 364 between the first and second images. Not all keypoints in the first textile-depicting image region will necessarily be matched with a keypoint in the second textile-depicting image region, and vice-versa. For example, as illustrated in FIG. 4, first keypoint 414 d in the first image region 412 is not matched with a corresponding second keypoint in the second image region 422. Additionally, second keypoint 424 e is not matched with a corresponding first keypoint in the first image region 412. Generally, the greater the measure of predicted matches of first and second keypoints in the first and second image regions, the more likely the first and second image regions depict the same surgical textile. The measure of predicted matches of first and second keypoints may be at least partially based on, for example, a total number of predicted matches, a percentage of first keypoints in the first image that have matches (matched to a keypoint in the second image), a percentage of second keypoints in the second image that have matches (matched to a keypoint in the first image), a ratio between the number or percentage of first keypoints in the first image that have matches and the number or percentage of second keypoints in the second image that have matches, and/or any combination thereof.

In another variation, the method may include defining a classification feature at least partially based on the consistency in the scale of feature descriptors for the matched first and second keypoints As described above, keypoints in the images may be determined by identifying local extrema in difference of Gaussian images across different scales (different scaling parameters), such that different keypoints may have corresponding feature descriptors with values from different scales. Generally, the more consistent or equal the scale of feature descriptors for the matched keypoints among the first and second images, the more likely the first and second image regions depict the same surgical textile.

In another variation, the method may include defining a classification feature at least partially based on the consistency in an orientation offset of the matched first and second keypoints. As described above, orientations of the keypoints in the images may be retained. Generally, the more consistent or equal the offset in orientation among the matched keypoints between the first and second images, the more likely the first and second image regions in the images depict the same surgical textile.

Global Aspects

In some variations, the first aspect of the first image region and/or the second aspect of the second image region may characterize one or more global aspects of the depicted surgical textile. Global aspects may, for example, characterize (on a larger scale than keypoints described above) the size, shape, or fluid content of a fluid pattern on the depicted surgical textile. Generally, in some variations of the method, a prediction of whether two or more images depict the same textile may be at least partially based on a comparison between the global aspects identified in the images.

In one variation, the global aspects may characterize an area of a fluid pattern on the depicted surgical textile. For example, as shown in FIG. 6A, the method may include quantifying a first area of a fluid pattern in the first image region 640, quantifying a second area of a fluid pattern in the second image region 642, and defining a classification feature at least partially based on the quantifications of the first and second areas 650. Generally, the classification feature (labeled as fluidRegionRatio in FIG. 5) may indicate level of similarity of the quantifications of first and second areas (e.g., spread of the fluid pattern between the two imaged textiles), where the more similar the quantified first and second areas are, the more likely the first and second image regions depict the same surgical textile.

As one illustrative example, areas of fluid patterns may be quantified as a ratio between an area of the depicted textile containing fluid and the total area of the depicted textile (e.g., a percentage of textile that is soiled with fluid). Characterizing areas of fluid patterns with such ratios may account for the possibility of surgical textiles being imaged at different camera distances. Generally, for each of the first and second images, the method may include determining an area of the fluid pattern, determining an area of the surgical textile, and determining the ratio of the area of the fluid pattern to the total textile area. The area of the fluid pattern may be based on, for example, the number of pixels in the image region having a color component value (e.g., red) above a predetermined threshold (e.g., “fluid” pixels). The area of the surgical textile may be based on, for example, the number of pixels in the image region previously determined (e.g., by user selection or edge detection techniques) to depict the surgical textile (e.g., “textile” pixels). The quantified area of fluid patterns in a textile-depicting image region may then be based on a ratio of “fluid” pixels to “textile” pixels (or alternatively, vice-versa). Accordingly, with reference to FIG. 6B, quantifying a first area of a fluid pattern in the first image region 640 may include determining a first fluid ratio R₁ of the fluid pattern area A_(FL,1) to the total textile area A_(r,1) in the first textile-depicting image region 612. Similarly. quantifying a second area of a fluid pattern in the second image region 642 may include determining a second fluid ratio R₂ of the fluid pattern area A_(FL,2) to the total textile area A_(r,2) in the second textile-depicting image region 622. Furthermore, subsequent to determining these ratios for the first image region and for the second image region, the method may include defining a classification feature (labeled as fluid RegionRatio in FIG. 5) at least partially based on a comparison of the ratios (e.g., comparison of the percentage of textile that is soiled with fluid). For example, the classification feature may be based on an absolute difference between the first fluid ratio R₁ and the second fluid ratio R₂ (e.g., R₁ or R₂ or vice versa) and or a measure of the difference between the first fluid ratio R₁ and the second fluid ratio R₂ (e.g., R₂/R₁ or R₁/R₂).

Alternatively, in another variation, area of a fluid pattern on the depicted surgical textile may be quantified as the fluid pattern area (e.g., absolute number of pixels comprising the fluid pattern in the depicted textile) A_(FL,1) or A_(FL,2). A classification feature may be teed on the difference between the absolute number of “fluid” pixels to the first image region and the absolute number of “fluid” pixels in the second image region, for example, when size of the depicted surgical textile is standardized across all images (e.g., precautions are taken to ensure each textile is imaged from the same camera distance, images or textile-depicting image regions are adjusted to be the same size, etc.).

In another variation, the global aspects may characterize content of a fluid pattern on the depicted surgical textile. For example, as shown in FIG. 7, the method may include quantifying a first fluid component depicted in the first image region 740, quantifying a second fluid component depicted in the second image region 742, and defining a classification feature at least partially based on the quantifications of the first and second fluid components 750. The quantification may measure, for example, mass, weight, volume, concentration, etc. of the fluid component. In some variations in which the fluid in the surgical textile is blood, the fluid component to be quantified may be for example, hemoglobin, red blood cells, or other suitable blood component. For example, the global aspects of the depicted surgical textiles may include estimated hemoglobin mass. Generally, the classification feature may indicate a level of similarity of the content of the fluid pattern depicted in the first and second images, where the more similar the contents are, the more likely the first and second image regions depict the same surgical textile.

For example, to convert pixel color values of the fluid pattern to a fluid component quantity, template matching techniques may include comparing a redness intensity of the image region against redness intensity from template images (e.g., a training set, samples analyzed previously). Each template image may be contained within a library of template images, and may be associated with a known blood, hemoglobin, red blood cell mass or volume, and-or other fluid characteristics. Generally, where the redness intensity of the image region is substantially similar to (and is paired with) a closest-matching template image, the image region may be estimated as depicting the same fluid component quantity as the closest-matching template image.

In one example, K-nearest neighbor methods may be used for the template matching. More specifically, a K-nearest neighbor method may be used to compare the redness intensity of the image region with redness intensity values in the template images. Additionally or alternatively, a K-nearest neighbor method may be used to compare greenness intensity and/or a blueness intensity (e.g., in conjunction with a redness intensity) of pixels in the image region with greenness and/or blueness intensity values of the template images. Thus, the image region may be paired with the closest-matching template image identified with the K-nearest neighbor method, and the image region may be estimated as depicting the same fluid component quantity associated with the closest-matching template image.

In another example, absolute differences in pixel intensities (e.g., in red, green, and/or blue intensities or color values) may be used for the template matching. Such an absolute difference in pixel intensities may be calculated at a wavelength of light that correlates with the fluid component (e.g., at about 400 nm for estimating hemoglobin concentration). More specifically, a sum of absolute differences in pixel intensities may be used to compare pixel intensities between the image region and each template image. The closest-matching template image is identified when the sum of absolute differences is substantially minimal compared to other sums of absolute differences calculated for the image region and other template images. Thus, the image region may be paired with the closest-matching template image identified with the sum of absolute differences method, and the image region may be estimated as depicting the same fluid component quantity associated with the closest-matching template image.

Furthermore, parametric models may be used to convert pixel color values in the image region to a fluid component quantity. Generally, color values of the template images may be used to train or generate a parametric model (mathematical function, curve, or algorithm, etc.) that correlates a pixel color value to a fluid component quantity. The parametric model may lake an input of pixel intensities or color values and convert it into an output of an estimated fluid component quantity value.

Additionally or alternatively, in quantifying a fluid component in the first image region and/or second image region, the method may employ any one or more techniques such as those described in U.S. Pat. No. 8,792.693 and/or 8,983,167. each of which is hereby incorporated in its entirety by this reference.

As shown in FIG. 7, subsequent to quantifying a first fluid component depicted in the first image region 740 and quantifying a second fluid component depicted in the second image region 742, the method may include defining a classification feature at least partially based on the quantifications of the Just and second fluid components 750. In some variations, the classification feature (labeled as fluidEstimate in FIG. 5) may be at least partially based on a comparison between the quantifications of the first and second fluid components, such as an absolute difference or percentage difference, to indicate similarity in the quantity of the fluid component between the two images.

In another variation, the global aspects may characterize global shapes of a fluid pattern on the depicted surgical textile. For example, global geometric aspects of the fluid pattern on the textiles may be classified and used to characterize each textile-depicting region. For example, generally larger-scale geometric patterns (e.g., “large” patch versus “small” patch in the fluid pattern) may be recognized and stored as a fingerprint or other unique identifier corresponding to each image or image region. Centers and radii of fluid subregions (e.g., blobs) may also be incorporated in characterize the global geometric aspects of the fluid pattern. As another example, the 2D shape of the fluid pattern (or subregions of the fluid pattern) may he identified and transformed with a Fourier transform to create a unique identifier for the fluid pattern or subregion of the fluid pattern, and therefore a unique identifier for each textile-depicting region.

In yet another variation, image aspects may include aspects of a threading pattern on the depicted surgical textile. For example, it may be appropriate in some instances to consider that each surgical textile has a unique thread pattern (e.g., at least on a very fine scale that may he captured in an optical image). Determining or extracting features of the threading pattern may he similar, for example, to feature extraction techniques described above.

Measure of Likelihood of Duplicate Imaging

As shown in FIG. 2, the method may include measuring a likelihood that the first and second image regions depict at least a portion of the same textile 260. Generally, this measure of likelihood of duplicate imaging may be based on the one or more classification features for the first and second images, and may represent a risk that the first and second images depict at least a portion of the same textile, or equivalemly a level of certainty or confidence that the first and second images are not duplicate images.

In some variations, the measure of likelihood of duplicate imaging may be generated with a suitable classification algorithm applied to one or more classification features. For example, for each pair of images under analysis (e.g., the first and second images), such algorithms may take one or more of the classification features described above as inputs, and generate a value indicating the probability that the pair of images depict at least a portion of the same textile. For example, the classification algorithm may include a K-nearest neighbors approach, a decision tree approach, a support vector machine, random forest or extra tree approach, neural network approach (e.g., convolutional neural network approach), etc. The classification algorithm may be a machine learning algorithm that has been trained on previously-generated training data. For example, the classification algorithm may have been trained using a training dataset that includes classification features based on labeled pairs of images, where the labeled pairs of images are either labeled as known “duplicates” (that is, depicting the same textile) or Known “not duplicates” (that is, not depicting the same textile). In some variations, the classification algorithm may be trained such that a greater measure of likelihood that a pair of images are duplicates is indicated by a higher numerical score (i.e., the classification algorithm may be trained to classify images as “duplicates”). Alternatively, the classification algorithm may be trained such that a greater measure of likelihood that a pair of images are duplicates is indicated by a lower numerical score (i.e., the classification algorithm may be trained to classify images as “not duplicates”). The measure of likelihood may, for example, range between about 0 and about 1 (or between about 0 and about 100, or any other suitable range). Furthermore, a score output of any suitable classification algorithm may be converted to a probability via methods such as Platt scaling or isotonic regression, etc.

Accordingly, measuring a likelihood that the first and second image regions depict at least a portion of the same textile 260 may include applying a classification algorithm to the at least one classification feature corresponding to the first and second images. The classification algorithm may generate a measure of likelihood that the pair of images depict at least a portion of the same textile, in practice, the classification algorithm may be further applied to classification features for each pair of images received, such that each pair of images has a corresponding measure of likelihood indicating the probability that the pair depicts at least a portion of the same surgical textile. Each measure of duplicate likelihood may then be evaluated such as by comparison to one or more thresholds, as further described below. Additionally, in some variations, the measure of likelihood may be communicated to the user (e.g., visually on a display and/or audibly through a speaker device, etc.) after it is generated.

In some variations, the method may include adjusting the measure of duplicate likelihood based on one or more other risk-based parameters. For example, the measure of duplicate likelihood may be increased or decreased to reflect type of surgical textiles (e.g., it may be harder to distinguish between different instances of one type of textile than between different instances of another type of textile) and/or other risk-based parameters that may not be not accounted for in the classification features and classification algorithms. As another example, multiple classification algorithms may additionally or alternatively be applied to the one or more classification features for each pair of images, resulting in multiple measures of duplicate likelihood that may be averaged or otherwise combined (e.g., to increase confidence level) to generate an aggregate risk score as an adjusted measure of likelihood for each pair of images. In some variations, the adjusted measure of duplicate likelihood may be considered an individual risk score for the pair of images under analysis reflecting the risk that the images depict at least a portion of the same surgical textile.

Evaluation of Measure of Likelihood

As shown in FIG. 2, the method may include comparing the measure of likelihood of duplicate imaging to a predetermined threshold (270), where the threshold is a cutoff for classifying an image pair as “not duplicate” or “potentially duplicate.” For example, if the measure of duplicate likelihood (which may be adjusted or not adjusted) does not meet the threshold, then the method may include incrementing an index counter 272, where the index counter tracks surgical textile count. Conversely, if the measure of duplicate likelihood does meet the threshold then the method may include classifying the first and second images as potentially depicting duplicate textiles 274, withholding an increment of the index counter, and/or triggering additional evaluation such as that described below in some variations, the index counter may still increment if the measure of duplicate likelihood does meet the threshold, but may trigger additional evaluation such as that described below.

In some variations, the measure of duplicate likelihood for a pair of images may be compared to one threshold to classify the images into one of two categories: “not duplicates” or “potential duplicates.” For example, in variations in which the measure of duplicate likelihood ranges from 0-100 and higher values correspond to higher likelihood of duplicate imaging, an image pair's measure of duplicate likelihood that is less than a threshold of 50 may result in classifying the image pair as “not duplicates,” while an image pair's measure of duplicate likelihood that is 50 or more may result in classifying the image pair as “potential duplicates” However, any suitable single threshold on a 0-100 scale may be used (e.g., between about 10 and about 90, between about 25 and about 75, between about 35 and about 65. between about 45 and about 55, etc.), or any suitable threshold in any suitable range (e.g., at about a midpoint of the possible range of values of the measure of duplicate imaging). The threshold may be adjusted for desirable sensitivity. For example, it may be preferable to have more false positives (i.e., incorrect predictions of duplicates) than false negatives to trigger user confirmation of whether duplicate imaging has occurred. Such threshold adjustment may occur based on manual selection by a user, and/or based on certain environmental conditions (e.g., when multiple surgical textiles consistently appear to be fully or nearly fully saturated with fluid, and thus more difficult to distinguish from each other).

Alternatively, in some variation, the measure of duplicate likelihood for a pair of images may be compared to multiple thresholds to classify the images into more than two categories. For example, two thresholds may classify an image pair's measure of duplicate likelihood as representing a “low”, “medium”, or “high” risk for being potential duplicates (e.g., on a scale of 0-100, a measure of duplicate likelihood below a first threshold of about 25 may correspond to a low risk for duplicate imaging, a measure of duplicate likelihood above a second threshold of about 75 may correspond to a high risk for duplicate imaging, and a measure of duplicate likelihood between the first threshold 25 and the second threshold 75 may correspond to a medium risk for duplicate imaging). Other suitable numbers and types of thresholds may be used to classify the image pairs into any suitable number or type of risk categories.

If a measure of duplicate likelihood meets a predetermined threshold (e.g., is determined to sufficiently indicate a potential duplicate image pair), then the method may include communicating the potential duplicity to a user. In some variations as shown in FIG. 9A, the communication may include a display notification visually presented to a user, indicating that a possible duplicate image has been obtained or received. The measure of duplicate likelihood or a representation thereof (e.g., presented as a confidence level) and/or the suspected duplicate image pair may be displayed. The user may be prompted to perform one or more actions in response to the detection of a possible duplicate image pair. For example, the user may be prompted to perform a manual count of surgical textiles that have been imaged up to that point, and asked to reconcile any discrepancies. As another example, the user may be prompted to use a user interface (e.g., touchscreen) to confirm whether the suspected duplicate image pair actually depicts the same textile (e.g., by reviewing the fluid patterns in the suspected duplicate image pair, remembering situational context of when the images were taken, weighing textiles depicted in suspected duplicate images to confirm distinctiveness based on different fluid weights, etc.). As another example, the user may be prompted lo select one or both images in the suspected duplicate image pair for retention (e.g., with buttons 910) and/or deletion from the display and/or storage (and/or a decrement in an index counter, if the deleted image was previously associated with an increment to the index counter), thereby effectively removing the duplicity (and keeping textile count as accurate as possible). The method may, in some variations, include detecting one or more kinds of textile transformations between the image pair, such as rotation, flipping, or out-of-plane orientations, etc. and displaying the detected kinds of transformations, which may aid the user in verifying whether the images depict the same textile. Additionally or alternatively, the method may include adjusting at least one of the potential duplicate images to compensate for one or more kinds of textile transformations (e.g., rotating, flipping, deskewing, etc.) and displaying the adjusted images to be as similar in orientation as possible, which may aid the user in mentally resolving image differences and verifying whether the images depict the same textile. The image adjustments may be automatically performed based on what kind of textile transformation is detected, though additionally or alternatively the user may use an interface (e.g., with direction arrow buttons 920, etc.) to manually adjust the orientation of one or both images.

In some variations, as shown in FIG. 9B, communicating a potential duplicate image may include displaying some or all images obtained or received, and visually indicating potential groups of duplicates For example, potential duplicate image pairs may be indicated with connecting lines (between images), and/or matching borders. Potential duplicate image pairs may be differentiated based on, for example, line weight, line patterns, color, etc. Other visual indications (e.g., color tinting, fading, etc.) may similarly be used to identify potential duplicate image pairs. Furthermore, measures of duplicate likelihood of the image pairs, or a representation thereof (e,g., presented as a confidence level) may be communicated with labels, by thickness of line weight, or other suitable manners. For example, as shown in FIG. 9B, images 2 and 5 have a high measure of duplicate likelihood, as indicated with heavy line weight and corresponding caption, while images 3 and 5 have a medium measure of duplicate likelihood, as indicated with a medium line weight and corresponding caption.

In yet other variations, communicating potential duplicate image pairs may include a displayed warning and/or an audible alarm warning such as a beep, tone, and/or spoken word command, which indicates that a possible duplicate image has been obtained or received. Additionally, the warning may be communicated through the electronic medical record system (EMR). An alarm may be triggered, for example, when one possible duplicate has been detected or when a threshold number of possible duplicates have been detected.

Potential duplicate image pairs may be communicated to a user substantially real-time as each new image is received (e.g., immediately after an image is received and analyzed to determine a measure of duplicate imaging relative to previously received images). For example, a user interlace may display a prompt similar to that shown in FIG. 9A soon after an image is obtained Of received, if the new image is predicted to be a potential duplicate. Additionally or alternatively, potential duplicate image pairs may be communicated to a user in an image review pane, which may display at least some of the images in an overview screen. For example, an image overview screen may display all images obtained up to that point (e.g., during the surgical procedure, or at the end of the surgical procedure) and communicate all potential duplicate images on the overview screen. As another example, an image overview screen may be limited to displaying images depicting a selected type of textile (e.g., tap sponge) and communicating all potential duplicate images on the type-specific overview screen, similar to that shown in FIG. 9B. Potential duplicate images may be selected from the overview screen and confirmed as depicting the same textile (or not depicting the same textile), selected for retention, selected for deletion, etc. as described above.

As described above, the method may include conditionally modifying an index counter representing a textile count based on a comparison between the measure of duplicate likelihood and at least one predetermined threshold. For example, if the measure of duplicate likelihood does not meet a predetermined threshold (e.g., in the absence of detection of a potential duplicate image), then the method may include incrementing the index counter. In contrast, upon detection of a potential duplicate image of a surgical textile, the method may, for example, automatically withhold from incrementing a textile count index counter or decrement a previously-incremented index counter. Furthermore, in variations in which the measure of duplicate likelihood for a pair of images is compared to multiple thresholds, different consequences may result from the comparison to the different thresholds. For example, if the measure of duplicate likelihood does not meet a first threshold and therefore indicates a “low” risk of potential duplicates, then the method may include withholding from communicating any alert or warning to the user. If the measure of duplicate likelihood meets the first threshold but not a second threshold and therefore indicates a “medium” risk of potential duplicates, then the method may include communicating the risk of the potential duplicate image pair (e.g., requesting confirmation by the user whether the images depict the same textile) and accepting the user's conclusion of whether the images are duplicates. If the measure of duplicate likelihood meets the second threshold and therefore indicates a “high” risk of potential duplicates, then the method may include communicating the risk of the potential duplicate image pair but programmatically withhold from incrementing the textile count index counter, even if the user attempts to confirm that the images are not duplicates (or the method may require additional such confirmation, such as from multiple users providing confirmation in concurrence.

In some variations, the method may include generating an aggregate risk score for a set of received images (e.g., all images collected during a procedure, or a subset thereof), where the aggregate risk score incorporates the likelihood of duplicate imaging among some or all of the various images or image pairs in the set and generally indicates level of uncertainty in the overall textile count as contributed by potential duplicate images, for example, an aggregate risk score for an entire set of images (e.g., generally indicating level of uncertainty that the set includes at least one duplicate image) may be determined, such as by multiplying all measures of duplicate likelihood generated for each image pair in the set of images. As another example, an aggregate risk score for one selected image (e.g., generally indicating level of uncertainty that the selected image depicts the same textile as any other image in the set of images) may be determined, such as by multiplying all measures of duplicate likelihood generated for each image pair including the selected image. Similarly, an aggregate risk score of multiple selected images (e.g., generally indicating level of uncertainty that any of the selected images depict the same textile as any other image in the set of images) may be determined, such as by multiplying all measures of duplicate likelihood generated for each image pair including any of the selected images. As yet another example, an aggregate risk score for multiple images relative to one or more selected images (e.g., generally indicating level of uncertainty that any of the multiple images depict the same textile as any of the selected images) may be determined, such as by multiplying all measures of duplicate likelihood generated for each image pair between any of the multiple images and any of the selected images.

Similarly, the method may additionally or alternatively include generating a confidence level (or confidence percentage, score, etc.) that is generally an inverse of any of the aggregate risk score described above, where a confidence level generally indicates level of certainty that the overall textile count is accurate (e.g., level of certainty that there are no duplicate images).

Furthermore, the aggregate risk score and/or confidence level may be displayed on a display to the user, such as on an image overview screen as shown in FIG. 90 (e.g., presented as “duplicate risk score” or “confidence lever”). Additionally or alternatively, the aggregate risk score and/or confidence level may be communicated audibly via a speaker device. In some variations, an alarm (e.g., displayed and/or audible alarm) maybe triggered when an aggregate risk score or confidence level satisfies a predetermined threshold (e.g., when an aggregate risk score for all images collected up to that point is above a predetermined threshold value, or when a confidence level is below a predetermined threshold value).

Furthermore, the method may include displaying the index counter value for the surgical textile count, such as on an overview screen similar to that shown in FIG. 9C, or any suitable display. Additionally or alternatively, the method may include communicating the index counter value with an audible count, such as with a speaker device. In some variations, the surgical textile count may be stored in an electronic medical record for the patient, such as automatically upon conclusion of the surgical procedure (and/or intermittently as the surgical procedure proceeds) or upon user instruction on a user interface to add the surgical textile count to an electronic medical record.

Even further, the method may include displaying quantified aspects of the fluid contained in the surgical textiles, such as mass, volume, weight, concentration, etc. of the fluid or a fluid component contained in the surgical textiles, to help track extracorporeal fluid loss from a patient. For example, as shown in FIG. 9C, the method may include displaying estimated hemoglobin mass (e.g., determined as described above) in the surgical textile each image, and or an overall total of hemoglobin mass aggregated over the textiles depicted in all the images. In some variations, the quantified aspects of the fluid or fluid component in the surgical textiles (quantity for each textile and/or aggregated quantities) may be stored in an electronic medical record for the patient, such as automatically upon conclusion of the surgical procedure (and/or intermittently as the surgical procedure proceeds) or upon user instruction on a user interface to add the surgical textile count to an electronic medical record.

Uniformly Appearing Textiles

In some cases, uniformly appearing textiles may be difficult to visually differentiate from one another based on pattern recognition techniques described herein. Exemplary types of uniformly appearing textiles include unused textiles (e.g., clean), textiles that include only saline and/or other substantially transparent fluids, and fully saturated textiles (e.g., generally uniform shade of pink, red, etc. while saturated with blood). However, accuracy of a surgical textile count may result from an inability to distinguish between images of textiles having uniform appearances of the same general type. Accordingly, in some variations, the method may include one or more features for addressing potential duplicate imaging of uniformly appearing textiles.

In one variation, upon detecting that two or more images depict the same type of uniformly appearing textile, the method may include automatically classifying the images as potential duplicate images. For example, pattern recognition techniques described herein may detect that first and second textile-depicting images depict a “blank” textile (e.g., unused or includes a transparent fluid), which may result in a high measure of duplicate likelihood. In some variations, the user may be prompted and or permitted to confirm that the images are not duplicates. In some variations, the user may be prevented from confirming that the images are not duplicates, such that the uniformly appearing textiles automatically contribute to a higher risk score or lower confidence level as described above, regardless of whether the user attempts to confirm that the images depict distinct textiles.

In another variation, upon detecting that two or more images depict the same type of uniformly appearing textile, the method may include performing a secondary image processing technique for distinguishing between the images. For example, a classifying algorithm (similar to those discussed above) may classify an image or image region as depicting a surgical textile that is substantially uniformly saturated (e.g., substantially uniform shade of pink or red) or substantially uniformly unsaturated (e.g., substantially uniformly white). The classifying algorithm may, for example, use photometric and/or geometric methods for determining uniformity in appearance of the textile. If the classifying algorithm determines that the image depicts a surgical textile that is not uniformly appearing, then the method may include performing any one or more of the fluid pattern recognition techniques described above. On the other hand, if the classifying algorithm determines the image as depicting a uniformly appearing surgical textile, then the method may include performing an additional, secondary image processing technique. For example, the secondary image processing technique for distinguishing between two or more images depicting uniformly appearing textiles may include extracting a color-based feature (e.g., mean color component value such as RGB, CMYK, etc.) and/or a texture-based feature (e.g., contrast) from pixels or pixel groups in the images. Based on the similarity or dissimilarity of the extracted color-based features and/or texture-based features between the images, the images may be considered likely to be duplicate images or not likely to be duplicate images, respectively. Similarity or dissimilarity of the extracted color-based features and/or texture-based features may, for example, be measured by comparing extracted features from spatially-corresponding pixels or pixel groups between the images, histogram bin distributions of color component values, textile areas or si/e (e.g., based on number of pixels having a given color component value or range of values, or overall textile area), K-nearest neighbor algorithm, etc.

Furthermore, the method may, in some variations, additionally or alternatively include alerting or otherwise communicating to the user that two or more images are detected to depict the same type of uniformly appearing textile. For example, the method may include prompting the user to confirm whether the images are duplicates. If the images depict distinct textiles, the user may be prompted to tag or mark one or more of the textiles with a unique identifier (e.g., a colored or IR-detectable or UV-detectable dye to create a unique fluid pattern, label with a fabric marker, etc.) and re-image the tagged textile or textiles. For example, the new image of the tagged textiles may function to create a record supporting the confirmation that the imaged textiles were distinct.

In yet another variation, tracking blank textiles or other uniformly appearing textiles may be performed at least in part by generating an image that collectively depicts all the uniformly appearing textiles (e.g., laid out on a tray or other surface, hung against a wall or other background, or otherwise displayed such that each textile is separately visible in the image) and using computer vision techniques (e.g., edge detection, etc.) to identify each separate textile. Furthermore, the method may include incrementing an index counter as a textile counter based on the number of identified textiles in the image. Imaging all the uniformly appearing textiles collectively may, for example, confirm the existence and number of distinct, similarly-looking uniform textiles.

Other Variations

Other variations of the method for tracking surgical textiles may additionally or alternatively include other suitable computer vision and image classification techniques.

Image Warping Approach

In one variation, as shown in FIG. 11, the method may include receiving a first image comprising a first textile-depicting image region 1120, receiving a second image comprising a second textile-depicting image region 1130, warping at least one of the first and second image regions such that the first and second image regions have corresponding textile-depicting pixels (or pixel groups) 1150, and measuring a likelihood that the first and second image regions depict at least a portion of the same textile 1160. The measure of likelihood may, in some variations, be at least partially based on similarity of the corresponding textile-depicting pixels (or pixel groups).

For example, the corners of the textiles may be located and used to warp two or more images onto the same square or other suitable shape to facilitate image comparison (e.g., via a textile mask). There are various suitable ways to find the corners of a textile. For example, a gradient-based method such as the Harris comer detection algorithm may be used to generate guesses at candidate corners, and prior shape knowledge about the corners (e.g., knowledge that the corners are generally usually a known distance range apart from each other, and/or the comers tend to fit roughly to a square, rectangle, or trapezoid, etc. that has a certain range of parameter settings) could be used to filter out the unlikely guesses. Another exemplary technique to find corners would be to fit lines to the edges of the textile and take their intersection points as corners. Some prior information could be used to get good initial guesses at the edge locations, such as the fact that the textiles are usually roughly upright (e.g., have their planar surface perpendicular to the optical axis of the camera), and so the edge coordinate locations (e.g., in (x,y) space, etc.) may by indicated by peaks in the histograms of the spatial coordinates of the textile contour. Furthermore, the median and quartiles of the x and y coordinates (or locations in another suitable coordinate system) of the textile mask should correspond roughly to the center and outer quarters of the actual textile, even if the textile is somewhat misshapen. Linear regression to the textile contour coordinates may be used to refine the edge guesses, and/or a robust regression technique (e.g., RANSAC, Huber loss, or simply two or more rounds of linear regression where the second round ignores outliers from the first, etc.) may be used to make these edge fits mote insensitive to spurious contour points Additionally, higher-order regression may be used to enable a better lit to the textile edges, since textile edges are not always completely straight. Finally, midpoints or other partway points of the textile edges could be found and could be used to divide the textile into multiple quadrants or tiles, so that each of these tiles could be warped separately into a square shape or other suitable shape, so as to approximate the effects of uneven stretching of the textile.

As an alternative or in addition to the comer-warping method described above, the 3D shape of the textile may be used to warp the sponges. For example, a linear or non-linear surface may be fitted to the depth map or point cloud of the textile, and a transformation may be computed that transforms this surface into a flat plane that is parallel to the camera imaging plane and at a fixed location and distance. As another example, a convex or non-convex optimization approach may be used to find a series of rigid and/or non-rigid transformations that transform the textile depth map or point cloud into the desired shape. Ultimately, the computed transformation may be applied to the (x, y) coordinates of the color pixels of the textile images to warp them to the desired shape. Note that it is possible to control the complexity and scale of any of these transformations; for example, complex, small-scale transformations may be allowed to smooth out local, 3D textures, or alternatively only simple, large-scale transformations may be allowed so as to preserve those textures, which for example may be useful if 3D-texture-based descriptors are to be used.

Once the images have been warped onto the same general shape, the method may include comparing their contents in any one or more suitable manners to generate a similarity score. In some variations, the measure of duplicate likelihood may be equal to the similarity score (and evaluated and used similar to the manner described above), while in other variations the similarity score may be adjusted and/or combined with other features to generate the measure of duplicate likelihood. For example, the method may include directly comparing the images' pixels to each other and taking their RMSD or RMSE. As another example, use method may treat the two square images as vectors and take their cosine similarity score, either separately for each channel or after concatenating each channel together. This may, for example, help account for ambient lighting variation, since such lighting variation may scale the pixel intensities generally equally, so that the relative intensities are not impacted. As another example, blood segmentation masks could be compared instead of pixel color themselves, and/or the blood and textile segmentation masks could be used to denoise the images before comparison by replacing each non-blood pixel with the median of the textile pixel colors. The color or bloodiness of a pixel need not be the other thing that is compared for example, dense HOG or SIFT descriptor maps (or any other descriptor maps described herein or other suitable descriptor maps) could be computed and compared (i.e., each pixel may have a HOG or SIFT descriptor associated with it). Such descriptor maps may be computed before or after the warping process described above.

Additionally or alternatively to comparing individual pixels, the method may include pooling together and comparing blocks of pixels. In some variations, comparison at multiple scales (e.g., individual blocks, blocks of different sizes) may make the algorithm less sensitive to warping errors, uneven stretching effects, blood spreading, and/or other causes of small misalignments between corresponding pixels, etc. Comparing blocks of pixels may include averaging the pixel colors within each block, taking their pixel color histogram (in which case the comparison metric could be a histogram-comparison metric such as histogram-intersection, Mahalanobis distance. Bhattacharyya distance. Earth Mover's Distance, etc.) and/or any other type of pooling. The pooling could be done multiple times and need not be done at the same block-size-ratio each time. Furthermore, the blocks may be square-shaped or any suitable shape (e.g., honeycomb-shaped) and they may or may not overlap.

As another variation for comparing images, the method may include defining an edit distance between the two warped textiles, where an edit consists of moving a pixel or changing its color. Each edit may be associated with a cost, and an edit distance between two textiles may be defined as the lowest possible cost of transforming one textile into the other.

In yet another variation for comparing images, a pair of images tinder analysis may be fed into a convolutional neural network that is trained to give a similarity score. Similarity scores may be collected as features to determine if the two images are duplicates of the same textile. The images may be warped (e.g., using the methods described above) before being fed into the neural network, or they may be left unwarped. Depth maps and/or textile masks may be fed into the neural network alongside the color images, and other information such as SIFT descriptors and comer locations may be fed in as well. The two images may be stacked by channel so that the neural network treats them as one image with twice as many channels, or two networks may process the images separately and then combine their outputs in the upper layers (i.e. a “Siamese network” structure). Any suitable type of deep learning network may be used, including a fully-connected network, deep belief network, generative adversarial network, restricted Boltzmann machine, convolutional network with gated inputs, or any other suitable type of deep learning method.

In order to account for the fact that a textile can be flipped and rotated through any of 8 possible permutations, the method may include applying each of these permutations when comparing the two warped images and only keep the permutation that results in the highest duplicate-likelihood score. Any other heuristic could be used to choose a favored permutation, such as ranking or otherwise based on one or more of the similarity scores derived as described herein. Furthermore, a second classification algorithm may be trained specifically for the purpose of choosing the correct permutation in the case of duplicates. In some variations, such a second classification algorithm may be separate from a first classification algorithm. Alternatively, in some variations, there may be some information-sharing between the multiple classification algorithms. For example, at least two classifications may be performed by a single convolutional neural network that has at least two outputs. One of these outputs may estimate the duplicate likelihood and another of these outputs may estimate or choose the permutation, such that learned information from one of these tasks can help inform the other task. In some variations, the method may also use similarity scores from multiple permutations to inform duplicate recognition. For example, instead of simply taking the similarity score from the highest-scoring permutation, the method may take the ratio between the highest and second-highest similarity scores among the permutations, the intuition being that a true duplicate should only score well under one permutation, and all other permutations should get low similarity scores.

In some variations, the method may combine one or more such warping-and-similarity-score techniques with the previously-described SIFT methods and global-feature based techniques. For example, the textile corners may be used to prune out spurious SIFT keypoint matches and/or guide the homography that is fitted to the matches, or conversely the matched SIFT key points may be used to enhance the accuracy of the corner guesses or more accurately model any uneven stretching of the textiles. As another example, the keypoint-matching method described above may be used, but the warping technique may be applied first before computing any descriptors so as to make the descriptors more robust to variations in the positioning and shape of the textile. Additionally or alternatively, the features from the SIFT and global-feature methods may be concatenated with the features from the warping-and-similarity-score methods in order to enable better duplicate detection.

Bag-of-Words Approach

In another variation, the method may implement a “bag-of-words” model which treats local image features as “vocabulary.” For example, each image (or textile-depicting image region in the image) may be segmented into a suitable number of subregions (e.g., between 10 and 100, between 25 and 75, or any suitable number). Suitable subregions may be identified, for example, based on color patterns and/or geometric shapes, etc. in the fluid pattern on the depicted textile. One or more image features comprising the vocabulary may then be identified in each of the subregions. Suitable image features may include, for example. SIFT features as described above (or alternatively, SURF features or other suitable features derived from a suitable extraction algorithm). Each image or image region may then be characterized by and represented by a “bag-of-words” vector of occurrence counts of the vocabulary of image features. Accordingly, potential duplicate images may be identified by comparing their “bag-of-words” vectors (e.g., directly, via hash functions for faster lookup, etc.).

Feature Histogram Approach

In another variation, the method may implement a histogram-based model. Each image (or textile-depicting image region) may be represented by a histogram, where each histogram bin represents a different possible aspect of the image. For example, in one variation, a feature extraction algorithm (e.g., SURF, SIFT, etc.) may be used to learn a K-mean cluster from training images, and each histogram bin may be a K-cluster with a respective K-center. Accordingly, each image or image region may be represented as a histogram with K-bins based on the closeness of its similarly extracted features (e.g., SURF, SIFT, etc.,) to the K-centers of the bins. Absolute difference between the histograms may then be used to measure how similar or dissimilar, the depicted surgical textiles are, and therefore determine a measure of likelihood whether any given pair (or larger group) of images depict the same textile. As another example, each histogram bin may correspond to color component values for pixels in the textile-depicting image region for each image, such that each image or image region may be represented by a histogram reflecting color component value distribution in the depicted surgical textile.

Textile Bag Imaging Approach

In some variations, the method may include receiving and analyzing images that depict at least one surgical textile placed in a surgical textile counter bag or other compartmentalized holder (e.g., box, bins, etc.). The surgical textile counter bag may include pockets or other compartments, each configured to hold a designed number (e.g., one) of surgical textiles for counting. The pockets may include a transparent window through which the surgical textile, which may be rolled, wadded-up, or otherwise compacted in a known manner (e.g., wrapped using a predetermined technique), is visible. In some variations, the method may include receiving at least one image of the surgical textile counter bag (e.g., an image collectively depicting multiple pockets, or multiple images each depicting a respective pocket). In such variations, the method may include using computer vision techniques (e.g., blob detection algorithms) to determine whether a surgical textile is present in each pocket, and generating a textile count based on the number of surgical textiles present. For example, the method may-include extracting a color-based feature (e.g., color component value such as RGB, CMYK, etc.) and/or a texture-based feature (e.g., contrast) from pixels or pixel groups depicting a pocket or surgical textile. The extracted color-based and or texture-based features may be compared to known features of a mathematically-compacted (e.g., rolled, wadded-up, etc.) surgical textile to determine whether a textile is present in a pocket. Upon detecting a surgical textile is present in a pocket of the textile counter bag, the method may include incrementing an index counter for a textile count. Furthermore, distinct counts of textiles, such as blank textiles (unused or saturated with transparent fluids) or fully saturated textiles, may be generated by comparing the extracted color-based and/or texture-based features to known features of mathematically-compacted blank or fully saturated textiles.

Furthermore, in some variations, the method may include performing a three-dimensional (3D) scan of the surgical textile counter bag with a 3D imaging system. For example, the method may include using an infrared (IR) depth-sensing camera to perform a 3D scan of the surgical counter bag and determine contours of the pocket and/or of one or more textiles present in the pocket. The method may include applying a classification algorithm (e.g., a suitable classification algorithm described above) to classify the pocket as including a particular number of textiles (e.g., zero, one, two, or more). The classification algorithm may, for example, base its classification on contour features of pockets known to include zero, one, two, or more surgical textiles. The method may include modifying (or not modifying an index counter) for a textile count and/or triggering an alarm to the user of potential inaccuracy in the textile count, based on the classification of the number of textiles in each pocket. For example, based on the 3D scan of lite surgical textile counter bag, the method may determine whether more than one textile is present in a pocket, and subsequently communicate to the user (e.g., by visual and/or audible alert) that the textile count may be inaccurate and prompt the user to perform a manual recount of textiles.

Computer Vision Transforms of Tagged Textiles

In some variations, at least some (but not necessarily all) of the surgical textiles may be prelabeled or pretagged with a unique identifier. For example, at least some of the surgical textiles may be lagged with a scannable optical bar code, QR code, or other machine-readable identifier. However, when such tagged surgical textiles are saturated with a dark fluid such as blood, the fluid may visually obscure the machine-readable identifier (e.g., makes it difficult for a scanner to distinguish between black and while features in the bar code, etc.) and hampers the ability to determine an accurate textile count through scanning. To address this, one variation of a method for tracking surgical textiles includes applying one or more computer vision transforms on an image of the machine-readable identifier on a surgical textile, which acts as a filter to facilitate reading of the machine-readable identifier. For example, the method may include transforming the textile-depicting image region based on a color-based feature (e.g., color component value such as RGB, CMYK, etc.) and/or a texture-based feature (e.g., contrast) which may make it easier to visualize the data in the fluid-saturated machine-readable identifier. The machine-readable identifier on each depicted surgical textile may then be read from the transformed image region, thereby facilitating tracking of surgical textiles (and/or detection of duplicate imaging, etc.) despite possible obscuring of the identifier with dark fluid.

As another example, at least some of the surgical textiles may be lagged with an IR and/or UV-detectable fluid or other identifier. The IR or UV-detectable fluid may, for example, be a biocompatible and inert fluid. The IR and/or UV-detectable fluid may be applied to the surgical textiles in a unique fluid pattern particular to each textile, in this example, the method may include extracting an IR-based and/or UV-based feature from the machine-readable identifier depicted in the image, which may make it easier to visualize the data in the fluid-saturated machine-readable identifier. The machine-readable identifier on each depicted surgical textile may then be read based on the extracted IR-based and/or UV-based feature, thereby facilitating tracking of surgical textiles (and/or detection of duplicate imaging, etc.) despite possible obscuring of the identifier with dark fluid.

System

As shown in FIG. 1, a system 100 for tracking surgical textiles may include at least one processor 152 and memory 154 having instructions stored therein. The processor 152 may execute the stored instructions such that it is configured to receive a first image comprising a first textile-depicting image region, receive a second image comprising a second textile-depicting image region, and measure a likelihood that the first and second image regions depict at least a portion of the same textile. In this variations, the measure of likelihood is at least partially based on a first aspect of the first image region and a second aspect of the second image region. In another variation, the processor may be configured to warp at least one of the first and second image regions such that the first and second image regions have corresponding textile-depicting pixels (or pixel groups), and the measure of likelihood may be at least partially based on similarity between the corresponding textile-depicting pixels (or pixel groups). The system may further include an index counter, and the index counter may be incremented if the measure of likelihood is below a predetermined threshold For example, in measuring the likelihood that the first and second image regions depict at least a portion of the same textile, the processor 152 may be configured to define at least one classification feature at least partially based on at least one of the first aspect of the first image region and the second aspect of the second image region, where the measure of likelihood is at least partially based on the classification feature. Generally, the system 100 may, in some variations, be configured to substantially perform any one or more variations of the methods described in further detail herein.

As further shown in FIG. 1, the system 100 may include a camera 156 for obtaining one or more color images of the surgical textile, and/or a display 158 for displaying one or more of the images (and/or quantified aspects of the fluid in the surgical textiles, measures of likelihood that two or more images depict the same textile, prompts to the user to confirm whether duplicate imaging has occurred, etc.). In some variations, some or all of the system 100 may be in an integrated device and placed near the patient during the surgical procedure (e.g., in the operation room) to assess patient fluids that are contained in the surgical textiles, and/or to facilitate textile counting), for example, the system 100 may at least partially include a handheld or mobile electronic computing device 150 (e.g., that executes a native fluid analysis application program). Such a handheld or mobile device may for example, be a tablet computer. laptop computer, mobile smartphone, etc., which may include a camera, processor, and display. However, in other variations, some or all of the system components may be separated as discrete, interconnected devices. For example, the camera and or display may be located substantially near the patient during the surgical or medical procedure (e.g., in the operating room) while the processor may be located at a remote location (e.g., in the operating room separate from the camera and/or display, or outside the operating room), communicating with camera and display through a wired or wireless connection or other network.

Generally, one or more processors 152 may be configured to execute the instructions that are stored in memory 154 such that, when it executes the instructions, the processor 152 performs aspects of the methods described herein, the instructions may be executed by computer-executable components integrated with the application, applet, host, server, network, website, communication service, communication interface hardware, firmware, software elements of a user computer or mobile device, wristband, smartphone, or any suitable combination thereof. The instructions may be stored on memory or other computer-readable medium such as RAMs, ROMs, flash memory, EEPROMs, optical devices (e.g., CD or DVD), hard drives, floppy drives, or any suitable device.

The one or more processors 152 may be configured to perform the methods substantially as described herein. For example, the one or more processors may be configured to receive a first image comprising a first textile-depicting image region, receive a second image comprising a second textile-depicting image region, measure a likelihood that the first and second image regions depict at least a portion of the same textile where the measure of likelihood is at least partially based on a first aspect of the first image region and a second aspect of the second image region, and increment an index counter if the measure of likelihood meets a predetermined threshold indicating duplicates. In some variations, the processor 152 may be configured to define at least one classification feature at least partially based on at least one of the first aspect of the first image region and the second aspect of the second image region, and may be further configured to measure of the likelihood that the first and second image regions depict at least a portion of the same textile at least partially based on the classification feature.

As described above, the one or more processors 152 may be integrated in a handheld or mobile device 150. In other variations, the one or more processors 152 may be incorporated into a computing device or system such as a cloud-based computer system, a mainframe computer system, a grid-computer system, or other suitable computer system. Additionally or alternatively, the one or more processors may be incorporated into a remote server that receives images of surgical textiles, reconstructs and/or analyzes the images as described above, and transmits quantifications of one or more aspects of fluid in the surgical textiles, surgical textile counts, etc. to another computing device having a display for displaying such information to a user.

The system may further include a camera 156 that functions to generate one or more images of the surgical textile against a background during the surgical procedure, such as a set of one or more still images or as pan of a video feed. The camera 156 may include at least one optical image sensor (e.g., CCD, CMOS, etc.) that captures a color optical digital image with ted, green, and blue (RGB) color components for the pixels, and/or other suitable optical components. For example, the camera 156 may include a single image sensor paired with suitable corresponding optics and/or filters (e.g., color fitter arrays such as a Bayer pattern filter). As another example, the camera 156 may include multiple image sensors paired with suitable corresponding optics, such as at least one prism or diffractive surface to divide while light into separate color channels (e.g., RGB), each of which is detected by a respective image sensor. However, the camera 156 may include any suitable image sensors and other optics components to enable the camera 156 to generate images.

The camera may be configured to transmit images to the processor for analysis, and/or to a database that stores the images. As previously described, the camera may be integrated in the same device as one or more of the other components of the system 100, or the camera may be a separate component that communicates the image data to the other components.

The system may further include a display 158 that functions to display or otherwise communicate to a user (e.g., doctor, nurse) information that is generated by the system 100, including but not limited to patient information, images of surgical textiles, quantified metrics characterizing aspects of fluid in the surgical textiles, measures of likelihood of duplicate imaging of surgical textiles, an index counter value for a textile (or other item) count, warnings or prompts to the user indicating potential duplicate imaging of surgical textiles, etc. The display 158 may include a screen on a handheld or mobile device, a computer monitor, a television screen, a projector screen, or other suitable display.

In some variations, the display 158 may be configured to display a user interface that enables the user to interact with displayed information. For example, the user interface may enable the user to manipulate the images (e.g., zoom, crop, rotate, etc.) or manually define the image region depicting at least a portion of a surgical textile. As another example, the user interface may enable the user to select display options (e.g., font, color, language, etc.) and/or content (e.g., patient information, quantified metrics or other fluid-related information, alerts, etc.). As yet another example, the user interface may enable the user to select images for deletion due to depicting a duplicate surgical textile, or rotate flip, or other-wise manipulate images on the display. In these variations, the display may be user-interactive and include a resistive or capacitive touch screen that is responsive to skin, a stylet, or other user contact. In other variations, the display 158 may be user-interactive via a cursor controlled by a mouse, keyboard, or other input device.

Additionally or alternatively, the system may include a speaker or other suitable audio system that communicates quantified metrics or other fluid-related information, value for an index counter for surgical textiles (or other items), and/or warnings or prompts to the user. The display and/or the audio system may, for example, provide alerts upon one or more quantified estimations meeting a threshold (e.g., estimated quantity of fluids or certain fluid components aggregated over multiple surgical textiles exceeds a threshold), which may be useful to prompt certain actions in response, such as providing a blood transfusion. As another example, the display and/or audio system may provide alerts or prompts to the user upon a measure of likelihood that two or more images depict the same surgical textile, which may be useful to prompt the user to confirm whether duplicate imaging has occurred, re-assess location of counted and/or uncounted surgical textiles, etc.

As shown in FIG. 1, the display 158 may be integrated in the same device as one or more components of the system 100. Additionally or alternatively, the display 158 may include a standalone separate monitor, screen, or other suitable display.

EXAMPLE

A training dataset was developed to learn potentially suitable classification features and classification algorithms for tracking surgical textiles using pattern recognition in optical images. The training dataset included 600 images depicting the same surgical sponge but with various transformations (e.g., rotation, out-of-plane orientation changes, sponge flipping, etc.) and 600 images depicting different surgical sponges. SIFT feature descriptors were used to identify keypoints within the depicted surgical textiles in the training dataset images, and a K-nearest neighbor algorithm was used to identify correspondence between keypoints between pairs of depicted sponges. Using the extracted features and identified corresponding keypoints, a set of classification features were generated. The classification features included the classification features listed in FIG. 5, where the estimated fluid component for fluidEstimate was hemoglobin mass. The classification features were ted into four candidate classification algorithms for training: K-nearest neighbor classifier (KNN), support vector machine classifier (SVC), random forest classifier (RF), and extra tree classifier (ET) machine learning techniques.

The trained algorithms were tested using four subsets of data pulled from a testing dataset including 300 images depicting the same surgical sponge but with various transformations and 300 images depicting different surgical sponges. Results for the trained algorithms variously applied to Set 0, Set 1, Set 2, and Set 3 are shown in FIG. 10. With respect to Set 0, random forest classifiers (RF) generally resulted in a true positive rate (rate for correctly detecting duplicate sponge images) between about 80-82% and a false positive rate (rate for incorrectly detecting duplicate sponge images) of between about 17-19%, leading to an F-score (measuring accuracy of the classification algorithm) of between about 0.813-814. A trained K-nearest neighbor classifier (KNN) resulted in a true positive rate of about 84% and a false positive rate of about 25%, leading to an F-score of about 0.801. Other results for the various candidate classification algorithms for testing data sets Set 1, Set 2, and Set 3 are summarized in FIG. 10. Overall the best performance in detecting duplicate image pairs was given by the random forest (RF) classification algorithm with n_est=25 for Set 0.

The foregoing description, for purposes of explanation, used specific nomenclature to provide a thorough understanding of the invention. However, it will be apparent to one skilled in the art that specific details are not required in order lo practice the invention. Thus, the foregoing descriptions of specific embodiments of the invention are presented for purposes of illustration and description. They are not intended to be exhaustive or to limit the invention to the precise forms disclosed; obviously, many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, they (hereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated. It is intended that the following claims and their equivalents define the scope of the invention. 

1. A computer-implemented method for tracking surgical textiles, comprising: receiving a first image comprising a first textile-depicting image region; receiving a second image comprising a second textile-depicting image region; defining at least one classification feature at feast partially based on at least one of a first aspect of the first image region and a second aspect of the second image region; and measuring a likelihood that the first and second image regions depict at least a portion of the same textile, wherein the measure of likelihood is based at least in pan on the classification feature.
 2. The method of claim 1, wherein the first aspect comprises a plurality of first keypoints characterizing the first image region and the second aspect comprises a plurality of second key points characterizing the second image region, wherein each of the first and second keypoints is associated with a respective feature descriptor.
 3. The method of claim 2, further comprising generating at least one of the first and second keypoints based on a feature extraction technique.
 4. The method of claim 2, further comprising predicting one or more matches between at least one of the first keypoints and at least one of the second keypoints.
 5. The method of claim 4, wherein the classification feature is at least partially based on a numerical difference between the feature descriptors for the matched first and second keypoints.
 6. The method of claim 4, wherein the classification feature is at least partially based on a number of predicted matches of first and second keypoints.
 7. The method of claim 4, wherein defining at least one classification feature comprises titling a homography transform relating the matched first and second keypoints, and wherein the classification feature is at least partially based on a goodness of fit of the homography transform.
 8. The method of claim 4, wherein defining at least one classification feature comprises predicting an overall angle of rotation between the matched first and second keypoints based on a voting technique, and wherein the classification feature is at least partially based on a consensus voting ratio for the predicted overall angle of rotation.
 9. The method of claim 1, wherein at least one of the first and second aspects characterizes a fluid pattern.
 10. The method of claim 9, wherein the classification feature is at least partially based on at least one of an area of fluid depicted in the first image region and an area of fluid depicted in the second image region.
 11. The method of claim 9, wherein the classification feature is at least partially based on at least one of a quantification of a fluid component depicted in the first image region and a quantification of a fluid component depicted in the second image region.
 12. The method of claim 1, wherein measuring a likelihood that the first and second image regions depict at least a portion of the same textile comprises applying a classification algorithm.
 13. The method of claim 1, further comprising incrementing an index counter if the measure of likelihood does not meet a predetermined threshold.
 14. The method of claim 13, further comprising displaying the index counter on a display.
 15. A system for tracking surgical textiles, comprising: a processor configured to: receive a first image comprising a first textile-depicting image region; receive a second image comprising a second textile-depicting image region; define at least one classification feature at least partially based on at least one of a first aspect of the first image region and a second aspect of the second image region; and measure a likelihood that the first and second image regions depict at feast a portion of the same textile, wherein the measure of likelihood is based at least in part on the classification feature.
 16. The system of claim 15, wherein the lust aspect comprises a plurality of first keypoints characterizing the first image region and the second aspect comprises a plurality of second keypoints characterizing the second image region, wherein each of the first and second keypoints is associated with a respective feature descriptor.
 17. The system of claim 16, wherein the processor is configured to generate at least one of the first and second keypoints based on a feature extraction technique.
 18. The system of claim 15, wherein at least one of the first and second aspects characterizes a fluid pattern.
 19. The system of claim 15, further comprising an optical sensor configured to capture at least one of the first and second images.
 20. The system of claim 15, wherein the processor is configured to increment an index counter if the measure of likelihood does not meet a predetermined threshold.
 21. The system of claim 20, further comprising a display configured to display the index counter.
 22. A computer-implemented method for tracking surgical textiles, comprising: receiving a first image comprising a first textile-depicting image region; receiving a second image comprising a second textile-depicting image region; measuring a likelihood that the first and second image regions depict at least a portion of the same textile, wherein the measure of likelihood is at least partially based on a first aspect of the first image region and a second aspect of the second image region; and incrementing an index counter if the measure of likelihood does not meet a predetermined threshold.
 23. The method of claim 22, wherein the first aspect comprises a plurality of first keypoints characterizing the first image region and the second aspect comprises a plurality of second keypoints characterizing the second image region, wherein each of the first and second keypoints is associated with a respective feature descriptor.
 24. The method of claim 22, further comprising classifying the first and second images as potentially depicting at least a portion of the same textile if the measure of likelihood meets the predetermined threshold.
 25. The method of claim 24, further comprising communicating to a user the measure of likelihood that the first and second image regions depict at least a portion of the same textile.
 26. The method of claim 25, further comprising prompting the user to confirm whether the first and second image regions depict at least a portion of the same textile.
 27. The method of claim 26, further comprising decrementing the index counter if the user confirms that the first and second image regions depict at least a portion of the same textile.
 28. The method of claim 26, further comprising deleting from a display at least one of the first and second images if the user confirms that the first and second image regions depict at least a portion of the same textile.
 29. The method of claim 22, further comprising displaying the index counter on a display.
 30. A system for tracking surgical textiles, comprising: a processor configured to: receive a first image comprising a first textile-depicting image region, receive a second image comprising a second textile-depicting image region; measure a likelihood that the first and second image regions depict at least a portion of the same textile wherein the measure of likelihood is at least partially based on a first aspect of the first image region and a second aspect of the second image region; and increment an index counter if the measure of likelihood does not satisfy a predetermined threshold.
 31. The system of claim 30, wherein the first aspect comprises a plurality of first keypoints characterizing the first image region and the second aspect comprises a plurality of second keypoints characterizing the second image region, wherein each of the first and second keypoints is associated with a respective feature descriptor.
 32. The system of claim 30, wherein the processor is configured to classify the first and second images as depicting at least a portion of the same textile if the measure of likelihood meets the predetermined threshold.
 33. The system of claim 32, wherein the processor is configured to communicate to a user the measure of likelihood that the first and second image regions depict at least a portion of the same textile.
 34. The system of claim 33, wherein the processor is configured to prompt the user to confirm whether the first and second image regions depict at least a portion of the same textile.
 35. The system of claim 33, wherein the processor is configured to decrement the index counter if the user confirms that the first and second image regions depict at least a portion of the same textile.
 36. The system of claim 26, wherein the processor is configured to delete from a display if at least one of the first and second images if the user confirms that the first and second image regions depict at least a portion of the same textile.
 37. The system of claim 30, further comprising a display configured to display the index counter.
 38. A computer-implemented method for tracking surgical textiles, comprising. receiving a first image comprising a first textile-depicting image region; receiving a second image comprising a second textile-depicting image region; warping at least one of the first and second image regions such that the first and second image regions have corresponding textile-depicting pixels; and measuring a likelihood that the first and second image regions depict at least a portion of the same textile, wherein the measure of likelihood is based at least in pan on similarity between the corresponding textile-depicting pixels.
 39. The method of claim 38, wherein warping at least one of the first image region and the second image region comprises determining a set of one or mote textile corners in the first image region or the second image region and mapping the set of textile corners onto a known shape.
 40. A system for tracking surgical textiles, comprising; a processor configured to: receive a first image comprising a first textile-depicting image region; receive a second image comprising a second textile-depicting image region; warp at least one of the first and second image regions such that the first and second image regions have corresponding textile-depicting pixels; and measure a likelihood that the first and second image regions depict at least a portion of the same textile, wherein the measure of likelihood is based at least in pan on similarity between the corresponding textile-depicting pixels.
 41. The system of claim 40, wherein the processor is configured to determine a set of one or more textile corners in the first image region or the second image region and map the set of textile comers onto a known shape. 